package com.company.project.file.service;

import com.company.project.file.po.FileParameterConfig;
import com.company.project.file.dao.FileParameterConfigDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName FilePathConfigServiceImpl
 * @Author sherry
 * @Date 2025/3/2 12:08
 * @Description FilePathConfigServiceImpl
 * @Version 1.0
 */
@Service
public class FilePathConfigService {

    @Resource
    private FileParameterConfigDao pathConfigMapper;

    public List<FileParameterConfig> selectAll() {
        List<FileParameterConfig> fileParameterConfigLists = pathConfigMapper.selectAll();
        return fileParameterConfigLists;
    }


    public FileParameterConfig selectByInstId(String id) {
        FileParameterConfig FileParameterConfig = pathConfigMapper.selectByInstId(id);
        return FileParameterConfig;
    }

    @Transactional(rollbackFor = Exception.class)
    public void updateByInstId(String instId) {
        //删除角色
        pathConfigMapper.updateByInstId(instId);
    }
}
